//
//  XXDevice.swift
//  LEDSMART
//
//  Created by zj on 2022/9/29.
//  Copyright © 2022 LXF. All rights reserved.
//

import Foundation
import FastComponent

//public extension XXExtension where Base:NSObject{
public extension XXExtension where Base:UIDevice{
    func isPad() -> Bool{
//        CGFloat xC = kScreenWidth*0.5 - (isPad ? 300 : (IS_PhoneXAll ? 170 : 170));
//        CGFloat yC;
//        if ([[self getStringWithKey:kServiceName] containsString:BLEA0Key]) {
//            yC = kScreenHeight*0.5 + (isPad ? 250 : (IS_PhoneXAll ? 190 : 190));
//        }else {
//            yC = kScreenHeight*0.5 + (isPad ? 250 : (IS_PhoneXAll ? 190 : 150));
//        }
//        CGFloat wC = isPad ? 600 : (IS_PhoneXAll ? 340 : 340);
//        CGFloat hC = isPad ? 60 : (IS_PhoneXAll ? 45 : 45);

          return base.userInterfaceIdiom == UIUserInterfaceIdiom.pad
    }
    func isFullScreen() -> Bool{
//        let window =  UIApplication.shared.delegate?.window as? UIWindow;
//        window?.safeAreaInsets
//        [UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0
        return UIApplication.shared.delegate?.window??.safeAreaInsets.bottom ?? 0 > 0.0
    }
    
}
